var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var r in t) t.hasOwnProperty(r) && (e[r] = t[r]);
    })(e, t);
}, function(e, t) {
    function r() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (r.prototype = t.prototype, 
    new r());
}), a = this && this.__decorate || function(e, t, r, n) {
    var o, i = arguments.length, a = i < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, r) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, r, n); else for (var s = e.length - 1; 0 <= s; s--) (o = e[s]) && (a = (i < 3 ? o(a) : 3 < i ? o(t, r, a) : o(t, r)) || a);
    return 3 < i && a && Object.defineProperty(t, r, a), a;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("ActivityManager"), s = e("LoadManager"), c = cc._decorator, l = c.ccclass, d = c.property, u = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.skeleton = null, e.sprite = null, e.christmasSpriteFrame = null, e.newYearSpriteFrame = null, 
        e;
    }
    return i(e, t), e.prototype.onEnable = function() {
        var t = this;
        r.ActivityManager.getInstance().checkActivity(r.ActivityType.NEWYEAR) ? (this.sprite.spriteFrame = this.newYearSpriteFrame, 
        s.default.getInstance().loadRes({
            url: "skin/5/skeleton",
            type: sp.SkeletonData
        }).then(function(e) {
			t.skeleton.premultipliedAlpha = false,
            t.skeleton.skeletonData = e, t.skeleton.setAnimation(0, "animation2", !0);
        })) : (this.sprite.spriteFrame = this.christmasSpriteFrame, s.default.getInstance().loadRes({
            url: "skin/4/skeleton",
            type: sp.SkeletonData
        }).then(function(e) {
			t.skeleton.premultipliedAlpha = false,
            t.skeleton.skeletonData = e, t.skeleton.setAnimation(0, "animation2", !0);
        }));
    }, e.prototype.start = function() {}, a([ d(sp.Skeleton) ], e.prototype, "skeleton", void 0), 
    a([ d(cc.Sprite) ], e.prototype, "sprite", void 0), a([ d(cc.SpriteFrame) ], e.prototype, "christmasSpriteFrame", void 0), 
    a([ d(cc.SpriteFrame) ], e.prototype, "newYearSpriteFrame", void 0), a([ l ], e);
}(cc.Component);

n.default = u;